package com.vehicle.stock.provider.rocketmq.producer;

import org.apache.rocketmq.client.producer.LocalTransactionState;
import org.apache.rocketmq.client.producer.TransactionCheckListener;
import org.apache.rocketmq.common.message.MessageExt;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

/**
 * Created by yantingbin on 2017/8/11.
 */
@Component
public class TransactionCheckListenerImpl implements TransactionCheckListener {
    private static final Logger LOGGER = LoggerFactory.getLogger(TransactionCheckListenerImpl.class);

    @Override
    public LocalTransactionState checkLocalTransactionState(MessageExt msg) {
        LOGGER.info("server checking TrMsg " + msg.toString() + "%n");
        return LocalTransactionState.UNKNOW;
    }
}
